wu-formatdb -i chaetomium_globosum_1_supercontigs.fasta -p T
tblastn -i RVT2_CGLO.fa -d chaetomium_globosum_1_supercontigs.fasta -links -wordmask seg+xnu -mformat 3 -o RVT2-vs-cglo.BLAST.tab E=1e-8 hspsepSmax=100 hspmax=5000 

perl ../wublasttab_extract_TEdomain_hits.pl chaetomium_globosum_1_supercontigs.fasta RVT2_CGLO.fa RVT2-vs-cglo.BLAST.tab -d RVT2_cglo -n CgloRVT

cat RVT2_cglo/*.pep RVT2_CGLO.fa > RVT2_cglo.all
muscle -in RVT2_cglo.all -out RVT2_cglo.fasaln

#treebest nj -t jtt RVT2_cglo.fasaln > RVT2_cglo.nj.nhx
#bp_tree2pag.pl -if nhx -of newick RVT2_cglo.nj.nhx  > RVT2_cglo.nj.tre

FastTree RVT2_cglo.fasaln  > RVT2_cglo.fasttree.tre

perl ../extract_and_blast_pairs.pl RVT2_Cglo_2.nj.tre RVT2_Cglo

# now run your TIR finding script on one of these
cd RVT2_Cglo
perl ../../search_TcMariner.pl -db CgloMariner_59.fa -t CgloMariner_59-vs-CgloMariner_61.FASTA.tab

#We want to automate this more
